//
//  YPBaseCollectionView.h
//  project
//
//  Created by 姚敦鹏 on 2018/10/13.
//  Copyright © 2018年 rocHome. All rights reserved.
//

#import <UIKit/UIKit.h>

@class YPBaseCollectionView;

typedef void(^PullBlock)(YPBaseCollectionView *currentCollectionView);
typedef void(^EmptyTapBlock)(YPBaseCollectionView *currentTable);

@interface YPBaseCollectionView : UICollectionView
<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>

/** 页面为空 */
@property (nonatomic,assign) YPPageEmptyStatus emptyStatus;

@property (nonatomic,copy) PullBlock pullDownBlock;
@property (nonatomic,copy) PullBlock pullUpBlock;
@property (nonatomic,copy) EmptyTapBlock emptyTapBlock;

- (void)setPullDownBlock:(PullBlock)pullDownBlock
         withPullUpBlock:(PullBlock)pullUpBlock;

/**
 设置刷新
 
 @param isPullDown 是否可以下来刷新
 @param isPullUp 是否可以上拉刷新
 */
- (void)setIsPullDown:(BOOL)isPullDown
         withIsPullUp:(BOOL)isPullUp;

- (void)pullRefreshEnd;
- (void)pullRefreshNotMore;

- (instancetype)initWithFrame:(CGRect)frame
         collectionViewLayout:(UICollectionViewLayout *)layout
                     isPullUp:(BOOL)isPullUp
                   isPullDown:(BOOL)isPullDown;

- (instancetype)initWithFrame:(CGRect)frame
                     isPullUp:(BOOL)isPullUp
                   isPullDown:(BOOL)isPullDown;

@end
